package cn.vcjf.weapp.api.active.entity;

import cn.vcjf.weapp.common.web.PageModel;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

import java.math.BigDecimal;

/**
 * <p>
 *
 * </p>
 *
 * @author zhengzihang
 * @since 2018-09-26
 */
@TableName("vc_user_active")
public class UserActive extends PageModel<UserActive> {

	private static final long serialVersionUID = 1L;

	@TableId(value = "id", type = IdType.AUTO)
	private Integer id;

	/**
	 * 参与人id
	 */
	private Integer userId;
	/**
	 * 团长(1是团长,其他不是)
	 */
	private Integer colonel;
	/**
	 * 活动订单ID
	 */
	private Integer collageOrderId;
	/**
	 * 活动参与状态(1,进行中,2完成,3未完成,4取消)
	 */
	private Integer joinStatus;

	/**
	 * 砍的价格(砍价的价格,拼团时无)
	 */
	private BigDecimal cutPrice;
/***************************************************/
	/**
	 * 姓名
	 */
	@TableField(exist = false)
	private String name;
	/**
	 * 头像
	 */
	@TableField(exist = false)
	private String headPhoto;

	/**
	 * 活动ID
	 */
	@TableField(exist = false)
	private Integer goodsActiveId;

	public Integer getJoinStatus() {
		return joinStatus;
	}

	public void setJoinStatus(Integer joinStatus) {
		this.joinStatus = joinStatus;
	}

	public Integer getColonel() {
		return colonel;
	}

	public void setColonel(Integer colonel) {
		this.colonel = colonel;
	}

	public Integer getGoodsActiveId() {
		return goodsActiveId;
	}

	public void setGoodsActiveId(Integer goodsActiveId) {
		this.goodsActiveId = goodsActiveId;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getHeadPhoto() {
		return headPhoto;
	}

	public void setHeadPhoto(String headPhoto) {
		this.headPhoto = headPhoto;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getUserId() {
		return userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	public Integer getCollageOrderId() {
		return collageOrderId;
	}

	public void setCollageOrderId(Integer collageOrderId) {
		this.collageOrderId = collageOrderId;
	}

	public BigDecimal getCutPrice() {
		return cutPrice;
	}

	public void setCutPrice(BigDecimal cutPrice) {
		this.cutPrice = cutPrice;
	}

	@Override
	public void preInsert() {
		super.preInsert();
		joinStatus = 1;
	}

	@Override
	public void preUpdate() {
		super.preInsert();
	}

	@Override
	public String toString() {
		return "UserActive{" +
				"id=" + id +
				", userId=" + userId +
				", collageOrderId=" + collageOrderId +
				", cutPrice=" + cutPrice +
				", createUser=" + createUser +
				", createTime=" + createTime +
				", updateUser=" + updateUser +
				", updateTime=" + updateTime +
				", deleteFlag=" + deleteFlag +
				", sysUserId=" + sysUserId +
				"}";
	}
}
